<%--
  Created by IntelliJ IDEA.
  User: luchengdong
  Date: 2018/1/25
  Time: 下午10:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>学生列表</title>
</head>
<body>
    <h2>学生后台管理系统</h2>
    <a href="/smis/student?operate=edit">添加</a>
    <table cellpadding="0" cellspacing="0" border="1" width="60%">
        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${requestScope.studentArr}" var="student" varStatus="vs">
            <tr style="background-color: ${(vs.count % 2) == 0 ? '' : 'pink'}">
                <td>${student.sid}</td>
                <td>${student.name}</td>
                <td>${student.age}</td>
                <td><a href="/smis/student?operate=edit&sid=${student.sid}">编辑</a>|<a href="/smis/student?operate=delete&sid=${student.sid}">删除</a></td>
            </tr>
        </c:forEach>
    </table>
</body>
</html>
